package com.yuexin.project.store.goods.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yuexin.common.support.Convert;
import com.yuexin.project.store.goods.domain.GoodsList;
import com.yuexin.project.store.goods.mapper.GoodsListMapper;

/**
 * 物品管理 服务层实现
 * 
 * @author yuexin
 * @date 2018-11-29
 */
@Service
public class GoodsListServiceImpl implements IGoodsListService 
{
	@Autowired
	private GoodsListMapper goodsListMapper;

	/**
     * 查询物品管理信息
     * 
     * @param goodsId 物品管理ID
     * @return 物品管理信息
     */
    @Override
	public GoodsList selectGoodsListById(Integer goodsId)
	{
	    return goodsListMapper.selectGoodsListById(goodsId);
	}
	
	/**
     * 查询物品管理列表
     * 
     * @param goodsList 物品管理信息
     * @return 物品管理集合
     */
	@Override
	public List<GoodsList> selectGoodsListList(GoodsList goodsList)
	{
	    return goodsListMapper.selectGoodsListList(goodsList);
	}
	
    /**
     * 新增物品管理
     * 
     * @param goodsList 物品管理信息
     * @return 结果
     */
	@Override
	public int insertGoodsList(GoodsList goodsList)
	{
	    return goodsListMapper.insertGoodsList(goodsList);
	}
	
	/**
     * 修改物品管理
     * 
     * @param goodsList 物品管理信息
     * @return 结果
     */
	@Override
	public int updateGoodsList(GoodsList goodsList)
	{
	    return goodsListMapper.updateGoodsList(goodsList);
	}

	/**
     * 删除物品管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteGoodsListByIds(String ids)
	{
		return goodsListMapper.deleteGoodsListByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<GoodsList> selectGoodsListAll(String companyId) {
		return goodsListMapper.selectGoodsListAll(companyId);
	}
	
}
